import request from '@/utils/request'
/**
 * 委托样品检测
 **/

export function GetSampleNum(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/GetSampleNum',
    method: 'post',
    data: data
  })
}

export function GetSampleNumByNewNum(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/GetSampleNumByNewNum',
    method: 'post',
    data: data
  })
}

export function GenerateAccessory(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/GenerateAccessory',
    method: 'post',
    data
  })
}

export function create(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/Create',
    method: 'post',
    data
  })
}

export function deleteRecord(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/Delete',
    method: 'delete',
    data
  })
}

export function update(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/Update',
    method: 'post',
    data
  })
}

export function getList(data, pagination) {
  if (pagination) {
    data["pageIndex"] = pagination.pageIndex;
    data["pageSize"] = pagination.pageSize;
  }
  return request({
    url: '/api/v1/EntrustSampleDetection/GetList',
    method: 'get',
    params: data
  })
}

export function getEntrustOrderSampleDetectionBySampleDetectionId(data) {
  return request({
    url: '/api/v1/EntrustSampleDetection/getEntrustOrderSampleDetectionBySampleDetectionId',
    method: 'get',
    params: data
  })
}
